package com.csun.cmny.provider.model.domain;

import com.csun.cmny.core.mybatis.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Alias(value = "dmcPhoneDataHi")
@Table(name = "cn_dmc_phone_data_hi")
public class DmcPhoneDataHi implements Serializable {

    private static final long serialVersionUID = -2274535143195281878L;

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 设备编号
     */
    @Column(name = "device_id")
    private Long deviceId;

    /**
     * 状态, offline-离线，online-在线
     */
    private String status;

    /**
     * 是否布防 0-撤防 1-布防
     */
    private Integer arming;

    /**
     * 信号强度
     */
    @Column(name = "`signal`")
    private Integer signal;

    /**
     * 供电电压
     */
    private String svtg;

    /**
     * 输出电压
     */
    private String ovtg;

    /**
     * 电池电压
     */
    private String bvtg;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

}